import request from '@/utils/request'

// 查询优惠券列表
export function getCanGiftCoupons(query) {
  return request({
    url: '/shopping/mallCoupons/getCanGiftCoupons',
    method: 'get',
    params: query
  })
}
// 查询优惠券列表
export function listMallCoupons(query) {
  return request({
    url: '/shopping/mallCoupons/list',
    method: 'get',
    params: query
  })
}

// 查询优惠券详细
export function getMallCoupons(query) {
  return request({
    url: '/shopping/mallCoupons/getMallCoupons',
    method: 'get',
    params: query
  })
}

// 新增优惠券
export function addMallCoupons(data) {
  return request({
    url: '/shopping/mallCoupons',
    method: 'post',
    data: data
  })
}

// 修改优惠券
export function updateMallCoupons(data) {
  return request({
    url: '/shopping/mallCoupons',
    method: 'put',
    data: data
  })
}

// 删除优惠券
export function delMallCoupons(id) {
  return request({
    url: '/shopping/mallCoupons/' + id,
    method: 'delete'
  })
}
// 删除优惠券
export function logicDelMallCoupons(id) {
  return request({
    url: '/shopping/mallCoupons/' + id,
    method: 'delete'
  })
}

// 导出优惠券
export function exportMallCoupons(query) {
  return request({
    url: '/shopping/mallCoupons/export',
    method: 'get',
    params: query
  })
}
